package com.x.controller;

import com.x.LargeLanguageModelService;
import com.x.planning.model.ExecutionContext;
import java.util.UUID;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.chat.client.ChatClient.CallResponseSpec;
import org.springframework.ai.chat.client.ChatClient.ChatClientRequestSpec;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xjk
 * @date 2025-06-16
 */
@Slf4j
@RestController
@RequiredArgsConstructor
public class TestController {


  private final LargeLanguageModelService llmService;

  @GetMapping("/testPlanning")
  public void test(@RequestParam String user){

//    ChatClient planningChatClient = llmService.getPlanningChatClient();
//    ChatClientRequestSpec prompt = planningChatClient.prompt(user);
//
//    CallResponseSpec call = prompt.call();
//    System.out.println(call.content());
    ExecutionContext executionContext = new ExecutionContext();
    executionContext.setUserRequest(user);
    String planId = UUID.randomUUID().toString();
    executionContext.setPlanId(planId);
    executionContext.setNeedSummary(false);



  }


}
